import { request } from "@/utils/request"

export const PostWard = async (data: any) => {
    const res = await request({
        url: '/api/Ward',
        method: 'post',
        data: data
    })
    return res
}
export const GetWards = async () => {
    const res = await request({
        url: '/api/Ward',
        method: 'get',
    })
    console.log(res)
    return res
}

export const PutWard = (id: number, data: any) => {
    return request({
        url: `/api/Ward/${id}`,
        method: 'put',
        data: data
    })
}

export const DeleteWard = (id: number) => {
    return request({
        url: `/api/Ward/${id}`,
        method: 'delete'
    })
}